package com.mrobuy.jdvc.service.impl;

import com.gavel.parser.MYMROSkuParser;
import com.gavel.parser.SkuItem;
import com.gavel.utils.StringUtils;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.mrobuy.jdvc.dao.HtmlCacheDao;
import com.mrobuy.jdvc.entity.HtmlCache;
import com.mrobuy.jdvc.entity.Item;
import com.mrobuy.jdvc.entity.VCShelvesItem;
import com.mrobuy.jdvc.service.IntroBuilderService;
import com.mrobuy.jdvc.service.VCPictureService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.*;

@Service("introBuilderService")
public class IntroBuilderServiceImpl implements IntroBuilderService {

    private static Gson GSON = new GsonBuilder().create();

    private static Logger LOG = LoggerFactory.getLogger(IntroBuilderService.class);

    @Autowired
    private HtmlCacheDao htmlCacheDao;

    @Autowired
    private VCPictureService vcPictureService;

    @Override
    public String buildPCIntroHtml(SkuItem spuItem, List<Item> items) {

        StringBuilder tableHtml = new StringBuilder();

        if ( items!=null ) {

            Set<String> attrNames = new HashSet<>(spuItem.getAttrs().keySet());
            attrNames.remove("制造商型号");
            attrNames.remove("包装数量");

            if ( attrNames.size() > 0 ) {

                tableHtml.append("<div>\n" +
                        "            <table>\n" +
                        "                <thead class=\"thead-dark\">");

                tableHtml.append("<tr>\n");
                tableHtml.append("    <th class=\"productcode\">型号</th>\n");
                for (String name : attrNames) {
                    tableHtml.append("<th>" + name + "</th>\n");
                }
                tableHtml.append("    <th style=\"width:35px;\"></th>\n");
                tableHtml.append("</tr>\n");
                tableHtml.append("</thead>\n");


                tableHtml.append("<tbody>\n");
                // [制造商型号, 磨头外径(mm), 柄径(mm/inch), 最高转速(rpm), 包装数量]
                MYMROSkuParser parser = new MYMROSkuParser();
                for (Item item : items) {
                    try {
                        HtmlCache htmlCache = htmlCacheDao.load(item.getUrl());
                        if (htmlCache == null || StringUtils.isBlank(htmlCache.getHtml())) {
                            continue;
                        }
                        SkuItem _skuItem = parser.parser(item.getUrl(), htmlCache.getHtml());

                        Map<String, String> attrMap = _skuItem.getAttrs();

                        tableHtml.append("<tr>\n");
                        tableHtml.append("<td class=\"productcode\">" + attrMap.get("制造商型号") + "</td>\n");
                        for (String name : attrNames) {
                            tableHtml.append("<td>" + attrMap.get(name) + "</td>\n");
                        }
                        tableHtml.append("</tr>\n");
                    } catch (Exception e) {
                        LOG.warn("[URL: " + item.getUrl() + "]解析失败: " + e.getMessage());
                    }
                }

                tableHtml.append("</tbody>\n");


                tableHtml.append("</table>\n");
                tableHtml.append("</div>\n");
            }
        }


        String intro = spuItem.getIntro();
        intro = intro.replace(spuItem.getBrand(), "");
        intro = intro.replace(spuItem.getBrandEn(), "");


        int height = 100;
        String[] lines = intro.split("<br>");
        if ( lines!=null && lines.length > 3  ) {
            height = 60 + lines.length*20;
        }


        // 详情图片
        StringBuilder imageHtml = new StringBuilder();
        {
           if (  spuItem.getDetailPics()!=null ) {
               for (SkuItem.Pic pic : spuItem.getDetailPics()) {
                   try {
                       String vcUrl = vcPictureService.loadVCPicUrl(pic.getUrl(), "");
                       if (  StringUtils.isNotBlank(vcUrl) ) {
                           imageHtml.append(" <img src='" + vcUrl + "' />\n");
                           break;
                       }
                   } catch (Exception e) {

                   }
               }
           }
        }

        // 如果没有详情图片, 添加一张主图图片
        if ( imageHtml.length() == 0 ) {
            if (  spuItem.getProductPics()!=null ) {
                for (SkuItem.Pic pic : spuItem.getProductPics()) {
                    try {
                        String vcUrl = vcPictureService.loadProductVCPicUrl(pic.getUrl(), "");
                        if (  StringUtils.isNotBlank(vcUrl) ) {
                            imageHtml.append(" <img src='" + vcUrl + "' />\n");
                        }
                    } catch (Exception e) {

                    }
                }
            }
        }


        return "<style>.ssd-module-wrap {\n" +
                "        position: relative;\n" +
                "        margin: 0 auto;\n" +
                "        width: 750px;\n" +
                "        text-align: left;\n" +
                "        background-color: #fff\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-module, .ssd-module-wrap .ssd-module-heading {\n" +
                "        width: 750px;\n" +
                "        position: relative;\n" +
                "        overflow: hidden\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-module {\n" +
                "        background-repeat: no-repeat;\n" +
                "        background-position: left top;\n" +
                "        background-size: 100% 100%\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-module-heading {\n" +
                "        background-repeat: no-repeat;\n" +
                "        background-position: left center;\n" +
                "        background-size: 100% 100%\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-module-heading .ssd-module-heading-layout {\n" +
                "        display: inline-block\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-module-heading .ssd-widget-heading {\n" +
                "        font-style: normal;\n" +
                "        font-family: microsoft yahei;\n" +
                "        line-height: 30px;\n" +
                "        text-decoration: none;\n" +
                "        letter-spacing: 0px;\n" +
                "        font-weight: normal;\n" +
                "        color: #ffffff;\n" +
                "        background-color: transparent;\n" +
                "        float: left;\n" +
                "        display: inline-block;\n" +
                "        height: 100%\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-widget-text {\n" +
                "        position: absolute;\n" +
                "        overflow: hidden\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-widget-text {\n" +
                "        line-height: 1.5;\n" +
                "        word-break: break-all\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .ssd-widget-text span {\n" +
                "        display: block;\n" +
                "        overflow: hidden;\n" +
                "        width: 100%;\n" +
                "        height: 100%;\n" +
                "        padding: 0;\n" +
                "        margin: 0;\n" +
                "        word-break: break-all;\n" +
                "        word-wrap: break-word;\n" +
                "        white-space: normal\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .title {\n" +
                "        width: 750px;\n" +
                "        background-color: transparent;\n" +
                "        background-image: url(http://img30.360buyimg.com/sku/jfs/t2467/315/1479078334/2361/4757d7d6/566010f4N01f5d17a.png);\n" +
                "        height: 30px;\n" +
                "        text-align: left\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .title-ch {\n" +
                "        margin: 0 6px 0 15px;\n" +
                "        font-size: 14px\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .title-en {\n" +
                "        margin: 0 15px 0 6px;\n" +
                "        font-size: 12px\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .content {\n" +
                "        width: 750px;\n" +
                "        background-color: #F7F3F3;\n" +
                "        background-size: 100% auto;\n" +
                "        height: " + height + "px\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap .content-text {\n" +
                "        z-index: 0;\n" +
                "        color: #000000;\n" +
                "        font-weight: normal;\n" +
                "        letter-spacing: 0px;\n" +
                "        text-decoration: none;\n" +
                "        font-size: 14px;\n" +
                "        line-height: 1.5;\n" +
                "        font-style: normal;\n" +
                "        background-color: transparent;\n" +
                "        top: 16px;\n" +
                "        left: 42px;\n" +
                "        width: 750px;\n" +
                "        font-family: microsoft yahei;\n" +
                "        min-height: 110px\n" +
                "    }\n" +
                "\n" +
                "    .ssd-module-wrap img {\n" +
                "        width: 750px;\n" +
                "        background-size: 100% 100%;\n" +
                "        height: 750px;\n" +
                "    }\n" +
                "\n" +
                "    table {\n" +
                "        border-collapse: collapse;\n" +
                "        margin: 0 auto;\n" +
                "        text-align: center;\n" +
                "    }\n" +
                "\n" +
                "    table tbody {\n" +
                "        display: block;\n" +
                "        max-height: 600px;\n" +
                "        overflow-y: scroll;\n" +
                "    }\n" +
                "\n" +
                "    table thead, tbody tr {\n" +
                "        display: table;\n" +
                "        width: 710px;\n" +
                "        table-layout: fixed;\n" +
                "    }\n" +
                "\n" +
                "    table thead {\n" +
                "        width: 750px;\n" +
                "    }\n" +
                "\n" +
                "    table td, table th {\n" +
                "        border: 1px solid #cad9ea;\n" +
                "        color: #666;\n" +
                "        height: 30px;\n" +
                "    }\n" +
                "\n" +
                "    table thead th {\n" +
                "        background-color: #e6e6e6;\n" +
                "    }\n" +
                "\n" +
                "    table tr:nth-child(odd) {\n" +
                "        background: #fff;\n" +
                "    }\n" +
                "\n" +
                "    table tr:nth-child(even) {\n" +
                "        background: #F5FAFA;\n" +
                "    }\n" +
                "\n" +
                "    .productcode {\n" +
                "        width: 200px;\n" +
                "    }\n" +
                "    </style>\n" +
                "    <div class=\"ssd-module-wrap\">\n" +
                "        <div class=\"ssd-module-heading title\">\n" +
                "            <div class=\"ssd-module-heading-layout\">\n" +
                "                <span class=\"ssd-widget-heading title-ch\">产品信息</span>\n" +
                "                <span class=\"ssd-widget-heading title-en\">Product Description</span>\n" +
                "            </div>\n" +
                "        </div>\n" +
                "        <div class=\"ssd-module content\">\n" +
                "            <div class=\"ssd-widget-text content-text\">\n" +
                spuItem.getIntro() +
                "            </div>\n" +
                "        </div>\n" +
                tableHtml.toString() +
                "        <div>\n" +
                imageHtml.toString() +
                "        </div>\n" +
                "    </div>";
    }

    @Override
    public String buildMobileIntroHtml(SkuItem spuItem, List<Item> items) {

        StringBuilder tableHtml = new StringBuilder();

        if ( items!=null ) {

            Set<String> attrNames = new HashSet<>(spuItem.getAttrs().keySet());
            attrNames.remove("制造商型号");
            attrNames.remove("包装数量");

            if ( attrNames.size() > 0 ) {
                tableHtml.append("<div>\n" +
                        "            <table>\n" +
                        "                <thead class=\"thead-dark\">");

                tableHtml.append("<tr>\n");
                tableHtml.append("    <th class=\"productcode\">型号</th>\n");
                for (String name : attrNames) {
                    tableHtml.append("<th>" + name + "</th>\n");
                }
                tableHtml.append("    <th style=\"width:35px;\"></th>\n");
                tableHtml.append("</tr>\n");
                tableHtml.append("</thead>\n");


                tableHtml.append("<tbody>\n");
                // [制造商型号, 磨头外径(mm), 柄径(mm/inch), 最高转速(rpm), 包装数量]
                MYMROSkuParser parser = new MYMROSkuParser();
                for (Item item : items) {
                    try {
                        HtmlCache htmlCache = htmlCacheDao.load(item.getUrl());
                        if ( htmlCache==null  || StringUtils.isBlank(htmlCache.getHtml()) ) {
                            continue;
                        }
                        SkuItem _skuItem = parser.parser(item.getUrl(), htmlCache.getHtml());

                        Map<String, String> attrMap = _skuItem.getAttrs();

                        tableHtml.append("<tr>\n");
                        tableHtml.append("<td class=\"productcode\">" + attrMap.get("制造商型号") + "</td>\n");
                        for (String name : attrNames) {
                            tableHtml.append("<td>" + attrMap.get(name) + "</td>\n");
                        }
                        tableHtml.append("</tr>\n");


                    } catch (Exception e) {
                        LOG.warn("[URL: " + item.getUrl() + "]解析失败: " + e.getMessage());
                    }
                }
                tableHtml.append("</tbody>\n");


                tableHtml.append("</table>\n");
                tableHtml.append("</div>\n");
            }
        }


        String intro = spuItem.getIntro();
        intro = intro.replace(spuItem.getBrand(), "");
        intro = intro.replace(spuItem.getBrandEn(), "");


        int height = 140;
        String[] lines = intro.split("<br>");
        if ( lines!=null && lines.length > 3  ) {
            height = 50 + lines.length*38;
        }


        // 详情图片

        StringBuilder imageHtml = new StringBuilder();
        {
            if (  spuItem.getDetailPics()!=null ) {
                for (SkuItem.Pic pic : spuItem.getDetailPics()) {
                    try {
                        String vcUrl = vcPictureService.loadVCPicUrl(pic.getUrl(), "");
                        if (  StringUtils.isNotBlank(vcUrl) ) {
                            imageHtml.append(" <img src='" + vcUrl + "' />\n");
                        }
                    } catch (Exception e) {

                    }
                }
            }
        }

        // 如果没有详情图片, 添加一张主图图片
        if ( imageHtml.length() == 0 ) {
            if (  spuItem.getProductPics()!=null ) {
                for (SkuItem.Pic pic : spuItem.getProductPics()) {
                    try {
                        String vcUrl = vcPictureService.loadProductVCPicUrl(pic.getUrl(), "");
                        if (  StringUtils.isNotBlank(vcUrl) ) {
                            imageHtml.append(" <img src='" + vcUrl + "' />\n");
                        }
                    } catch (Exception e) {

                    }
                }
            }
        }

        return "<style>.ssd-module-mobile-wrap {\n" +
                "    position: relative;\n" +
                "    margin: 0 auto;\n" +
                "    width: 750px;\n" +
                "    text-align: left;\n" +
                "    background-color: #fff\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-module, .ssd-module-mobile-wrap .ssd-module-heading {\n" +
                "    width: 750px;\n" +
                "    position: relative;\n" +
                "    overflow: hidden\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-floor-activity {\n" +
                "    max-height: 380px;\n" +
                "    overflow: hidden\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-floor-shopPrior {\n" +
                "    max-height: 900px;\n" +
                "    overflow: hidden\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-floor-authorize {\n" +
                "    max-height: 300px;\n" +
                "    overflow: hidden\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-floor-reminder {\n" +
                "    max-height: 4000px;\n" +
                "    overflow: hidden\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-module {\n" +
                "    background-repeat: no-repeat;\n" +
                "    background-position: left top;\n" +
                "    background-size: 100% 100%\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-module-heading {\n" +
                "    background-repeat: no-repeat;\n" +
                "    background-position: left center;\n" +
                "    background-size: 100% 100%\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-module-heading .ssd-module-heading-layout {\n" +
                "    display: inline-block\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-module-heading .ssd-widget-heading-ch {\n" +
                "    float: left;\n" +
                "    display: inline-block;\n" +
                "    margin: 0 6px 0 15px;\n" +
                "    height: 100%\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-module-heading .ssd-widget-heading-en {\n" +
                "    float: left;\n" +
                "    display: inline-block;\n" +
                "    margin: 0 15px 0 6px;\n" +
                "    height: 100%\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-circle, .ssd-module-mobile-wrap .ssd-widget-line, .ssd-module-mobile-wrap .ssd-widget-pic, .ssd-module-mobile-wrap .ssd-widget-rectangle, .ssd-module-mobile-wrap .ssd-widget-table, .ssd-module-mobile-wrap .ssd-widget-text, .ssd-module-mobile-wrap .ssd-widget-triangle {\n" +
                "    position: absolute;\n" +
                "    overflow: hidden\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-rectangle {\n" +
                "    box-sizing: border-box;\n" +
                "    -moz-box-sizing: border-box;\n" +
                "    -webkit-box-sizing: border-box\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-triangle svg {\n" +
                "    width: 100%;\n" +
                "    height: 100%\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-table table {\n" +
                "    width: 100%;\n" +
                "    height: 100%\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-table td {\n" +
                "    position: relative;\n" +
                "    white-space: pre-line;\n" +
                "    word-break: break-all\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-pic img {\n" +
                "    display: block;\n" +
                "    width: 100% !important;\n" +
                "    height: 100% !important\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-text {\n" +
                "    line-height: 1.5;\n" +
                "    word-break: break-all\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-text span {\n" +
                "    display: block;\n" +
                "    overflow: hidden;\n" +
                "    width: 100%;\n" +
                "    height: 100%;\n" +
                "    padding: 0;\n" +
                "    margin: 0;\n" +
                "    word-break: break-all;\n" +
                "    word-wrap: break-word;\n" +
                "    white-space: normal\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-widget-link {\n" +
                "    position: absolute;\n" +
                "    left: 0;\n" +
                "    top: 0;\n" +
                "    width: 100%;\n" +
                "    height: 100%;\n" +
                "    background: 0 0;\n" +
                "    z-index: 100\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-cell-text {\n" +
                "    position: absolute;\n" +
                "    top: 0;\n" +
                "    left: 0;\n" +
                "    right: 0;\n" +
                "    width: 100%;\n" +
                "    height: 100%;\n" +
                "    overflow: auto\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-show {\n" +
                "    display: block\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .ssd-hide {\n" +
                "    display: none\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .M16043306301141 {\n" +
                "    background-color: transparent;\n" +
                "    width: 100.00%;\n" +
                "    line-height: 30px;\n" +
                "    background-image: url(http://img30.360buyimg.com/sku/jfs/t2467/315/1479078334/2361/4757d7d6/566010f4N01f5d17a.png);\n" +
                "    height: 30px;\n" +
                "    text-align: left\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .W16043306301141I0 {\n" +
                "    background-color: transparent;\n" +
                "    color: #ffffff;\n" +
                "    font-weight: normal;\n" +
                "    letter-spacing: 0px;\n" +
                "    text-decoration: none;\n" +
                "    font-size: 20px;\n" +
                "    line-height: 30px;\n" +
                "    font-family: microsoft yahei;\n" +
                "    font-style: normal;\n" +
                "    height: 30px\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .W16043306301141I1 {\n" +
                "    background-color: transparent;\n" +
                "    color: #ffffff;\n" +
                "    font-weight: normal;\n" +
                "    letter-spacing: 0px;\n" +
                "    text-decoration: none;\n" +
                "    font-size: 18px;\n" +
                "    line-height: 30px;\n" +
                "    font-family: microsoft yahei;\n" +
                "    font-style: normal;\n" +
                "    height: 30px\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .M16043306301362 {\n" +
                "    width: 100.00%;\n" +
                "    background-color: #f2f2f2;\n" +
                "    background-size: 100% auto;\n" +
                "    height: " + height + "px\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .W16043306301362I0 {\n" +
                "    rotate: 0;\n" +
                "    z-index: 0;\n" +
                "    color: #000000;\n" +
                "    font-weight: normal;\n" +
                "    letter-spacing: 0px;\n" +
                "    text-decoration: none;\n" +
                "    font-size: 20px;\n" +
                "    line-height: 1.5;\n" +
                "    font-style: normal;\n" +
                "    background-color: transparent;\n" +
                "    top: 8.25%;\n" +
                "    left: 3.07%;\n" +
                "    width: 92.53%;\n" +
                "    font-family: microsoft yahei;\n" +
                "    height: auto\n" +
                "}\n" +
                "\n" +
                ".ssd-module-mobile-wrap .img {\n" +
                "    width: 100.00%;\n" +
                "    background-color: #e9e9e9;\n" +
                "    background-size: 100% 100%;\n" +
                "    height: auto\n" +
                "}\n" +
                "\n" +
                "table {\n" +
                "    border-collapse: collapse;\n" +
                "    margin: 0 auto;\n" +
                "    text-align: center;\n" +
                "}\n" +
                "\n" +
                "table tbody {\n" +
                "    display: block;\n" +
                "    max-height: 600px;\n" +
                "    overflow-y: scroll;\n" +
                "}\n" +
                "\n" +
                "table thead, tbody tr {\n" +
                "    display: table;\n" +
                "    width: 710px;\n" +
                "    table-layout: fixed;\n" +
                "}\n" +
                "\n" +
                "table thead {\n" +
                "    width: 750px;\n" +
                "}\n" +
                "\n" +
                "table td, table th {\n" +
                "    border: 1px solid #cad9ea;\n" +
                "    color: #666;\n" +
                "    height: 30px;\n" +
                "}\n" +
                "\n" +
                "table thead th {\n" +
                "    background-color: #e6e6e6;\n" +
                "}\n" +
                "\n" +
                "table tr:nth-child(odd) {\n" +
                "    background: #fff;\n" +
                "}\n" +
                "\n" +
                "table tr:nth-child(even) {\n" +
                "    background: #F5FAFA;\n" +
                "}\n" +
                "\n" +
                ".productcode {\n" +
                "    width: 200px;\n" +
                "}</style>\n" +
                "<div cssurl=\"//sku-market-gw.jd.com/css/mobile/100009403625.css?t=1605489928974\"></div>\n" +
                "<div id=\"zbViewModulesH\" value=\"972\"></div>\n" +
                "<input id=\"zbViewModulesHeight\" type=\"hidden\" value=\"972\"/>\n" +
                "<div skudesign=\"100011\"></div>\n" +
                "<div class=\"ssd-module-mobile-wrap\">\n" +
                "    <div class=\"ssd-module ssd-module-heading M16043306301141\" id=\"detail-tag-id-424159\" name=\"detail-tag-id-424159\"\n" +
                "         text=\"产品信息\">\n" +
                "        <div class=\"ssd-module-heading-layout\">\n" +
                "            <span class=\"ssd-widget-heading-ch W16043306301141I0\">产品信息</span>\n" +
                "            <span class=\"ssd-widget-heading-en W16043306301141I1\">Product Description</span>\n" +
                "        </div>\n" +
                "    </div>\n" +
                "    <div class=\"ssd-module M16043306301362\" data-id=\"M16043306301362\">\n" +
                "        <div class=\"ssd-widget-text W16043306301362I0\">\n" +
                spuItem.getIntro() +
                "        </div>\n" +
                "    </div>\n" +
                tableHtml.toString() +
                "    <div class=\"ssd-module img\" data-id=\"img\">\n" +
                imageHtml.toString() +
                "    </div>\n" +
                "</div>";
    }

    @Override
    public String buildPCIntroHtml(VCShelvesItem item) {
       return  "";
    }

    @Override
    public String buildMobileIntroHtml(VCShelvesItem item) {
        return "";
    }

    @Override
    public String buildPCIntroHtml(List<VCShelvesItem> items) {
        return "";
    }

    @Override
    public String buildMobileIntroHtml(List<VCShelvesItem> items) {
        return "";
    }
}
